import { defineConfig } from "@sugarat/theme/node";
import { blogTheme } from "./blog-theme";

// Vitepress 默认配置
// 详见文档：https://vitepress.dev/reference/site-config
export default defineConfig({
  // 继承博客主题配置
  extends: blogTheme,
  lang: "zh-cn",
  title: "ChenJiaxin Blog",
  description: "粥里有勺糖的博客主题，基于 vitepress 实现",
  vite: {
    optimizeDeps: {
      include: ["element-plus"],
      exclude: ["@sugarat/theme"],
    },
  },
  lastUpdated: true,
  themeConfig: {
    lastUpdatedText: "上次更新于",
    // footer: {
    //   message: "自定义底部内容",
    //   copyright:
    //     'MIT Licensed | <a target="_blank" href="https://gitee.com/codercjx"> ChenJiaxin </a>',
    // },
    logo: "/logo.png",
    // editLink: {
    //   pattern:
    //     'https://github.com/ATQQ/sugar-blog/tree/master/packages/blogpress/:path',
    //   text: '去 GitHub 上编辑内容'
    // },
    nav: [
      { text: "首页", link: "/" },
      { text: "前端面试总结", link: "/interview/js/" },
      { text: "前端", link: "/front-end/vue3/" },
      // { text: "关于作者", link: "https://sugarat.top/aboutme.html" },
    ],
    sidebar: {
      "/front-end/": [
        {
          text: "前端体系",
          items: [
            {
              text: "vue3",
              link: "/front-end/vue3/",
            },
            {
              text: "react",
              link: "/front-end/react/",
            },
            {
              text: "Node.js",
              link: "/front-end/node/",
            },
            {
              text: "http",
              link: "/front-end/http/",
            },
          ],
        },
        {
          text: "浏览器",
          items: [
            {
              text: "浏览器与JS引擎",
              link: "/front-end/browser/",
            },
          ],
        },
        {
          text: "项目与实战",
          items: [
            {
              text: "我的实战项目优化",
              link: "/front-end/practical-optimization/",
            },
          ],
        },
      ],
      "/interview/": [
        {
          text: "前端面试总结",
          items: [
            {
              text: "JS面试考点",
              link: "/interview/js/",
            },
            {
              text: "Vue面试考点",
              link: "/interview/vue/",
            },
            {
              text: "React面试考点",
              link: "/interview/react/",
            },
            {
              text: "浏览器",
              link: "/interview/browser/",
            },
            {
              text: "网络协议",
              link: "/interview/network/",
            },
            {
              text: "H5新特性",
              link: "/interview/h5/",
            },
            {
              text: "CSS",
              link: "/interview/css/",
            },
            {
              text: "性能优化",
              link: "/interview/performance/",
            },
            {
              text: "开发思想",
              link: "/interview/develop/",
            },
            {
              text: "代码编写题",
              link: "/interview/code/",
            },
          ],
        },
      ],
    },
    // socialLinks: [
    //   {
    //     icon: "github",
    //     link: "https://github.com/ATQQ/sugar-blog/tree/master/packages/theme",
    //   },
    // ],
  },
});
